<!--
 * @Author: Ethan
 * @Github: https://github.com/ethanpub
 * @Date: 2019-12-18 10:20:51
 * @LastEditors  : Ethan
 * @Blog: https://ethan.pub
 * @LastEditTime : 2019-12-18 10:20:55
 * @Description: 🙏BUG退散🙏
 -->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        body,
        html {
            background: #010720;
        }

        @keyframes animX {
            0% {
                left: 0px;
            }

            100% {
                left: 750px;
            }
        }

        @keyframes animY {
            0% {
                top: -25px;
            }

            100% {
                top: 275px;
            }
        }

        @keyframes animX2 {
            0% {
                left: 0px;
            }

            100% {
                left: 500px;
            }
        }

        @keyframes animY2 {
            0% {
                top: -25px;
            }

            100% {
                top: 205px;
            }
        }

        @keyframes scale {
            0% {
                transform: scale(0.7) rotate(30deg)
            }

            50% {
                transform: scale(1) rotate(30deg)
            }

            100% {
                transform: scale(0.7) rotate(30deg)
            }
        }


        .ball {
            width: 50px;
            height: 50px;
            background-color: #f66;
            border-radius: 50%;
            position: absolute;
            color: #fff;
            font-size: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* 7个圆,x和y轴动画加起来是20s , 20/7 约等于 2.857 每个球y轴 从0递减2.857,x轴与y差10/2s */
        .ball1 {
            animation: animX 10s cubic-bezier(0.36, 0, 0.64, 1) -5s infinite alternate,
                animY 10s cubic-bezier(0.36, 0, 0.64, 1) 0s infinite alternate,
                scale 20s cubic-bezier(0.36, 0, 0.64, 1) 0s infinite alternate;
        }

        .ball2 {
            animation: animX 10s cubic-bezier(0.36, 0, 0.64, 1) -7.857s infinite alternate,
                animY 10s cubic-bezier(0.36, 0, 0.64, 1) -2.857s infinite alternate,
                scale 20s cubic-bezier(0.36, 0, 0.64, 1) -2.857s infinite alternate;
        }

        .ball3 {
            animation: animX 10s cubic-bezier(0.36, 0, 0.64, 1) -10.714s infinite alternate,
                animY 10s cubic-bezier(0.36, 0, 0.64, 1) -5.714s infinite alternate,
                scale 20s cubic-bezier(0.36, 0, 0.64, 1) -5.714s infinite alternate;
        }

        .ball4 {
            animation: animX 10s cubic-bezier(0.36, 0, 0.64, 1) -13.571s infinite alternate,
                animY 10s cubic-bezier(0.36, 0, 0.64, 1) -8.571s infinite alternate,
                scale 20s cubic-bezier(0.36, 0, 0.64, 1) -8.571s infinite alternate;
        }

        .ball5 {
            animation: animX 10s cubic-bezier(0.36, 0, 0.64, 1) -16.428s infinite alternate,
                animY 10s cubic-bezier(0.36, 0, 0.64, 1) -11.428s infinite alternate,
                scale 20s cubic-bezier(0.36, 0, 0.64, 1) -11.428s infinite alternate;
        }

        .ball6 {
            animation: animX 10s cubic-bezier(0.36, 0, 0.64, 1) -19.285s infinite alternate,
                animY 10s cubic-bezier(0.36, 0, 0.64, 1) -14.285s infinite alternate,
                scale 20s cubic-bezier(0.36, 0, 0.64, 1) -14.285s infinite alternate;
        }

        .ball7 {
            animation: animX 10s cubic-bezier(0.36, 0, 0.64, 1) -22.142s infinite alternate,
                animY 10s cubic-bezier(0.36, 0, 0.64, 1) -17.142s infinite alternate,
                scale 20s cubic-bezier(0.36, 0, 0.64, 1) -17.142s infinite alternate;
        }

        #loop,
        #loop2 {
            transform: rotate(-30deg);
            width: 750px;
            height: 300px;
            border: 2px solid #999;
            border-radius: 50%;
            position: absolute;
            left: 450px;
            top: 300px;
        }


        #loop2 {
            width: 500px;
            height: 230px;
            left: 570px;
        }

        #loop2 .ball1 {
            animation: animX2 10s cubic-bezier(0.36, 0, 0.64, 1) -5s infinite alternate,
                animY2 10s cubic-bezier(0.36, 0, 0.64, 1) 0s infinite alternate,
                scale 20s cubic-bezier(0.36, 0, 0.64, 1) 0s infinite alternate;
        }

        #loop2 .ball2 {
            animation: animX2 10s cubic-bezier(0.36, 0, 0.64, 1) -7.857s infinite alternate,
                animY2 10s cubic-bezier(0.36, 0, 0.64, 1) -2.857s infinite alternate,
                scale 20s cubic-bezier(0.36, 0, 0.64, 1) -2.857s infinite alternate;
        }

        #loop2 .ball3 {
            animation: animX2 10s cubic-bezier(0.36, 0, 0.64, 1) -10.714s infinite alternate,
                animY2 10s cubic-bezier(0.36, 0, 0.64, 1) -5.714s infinite alternate,
                scale 20s cubic-bezier(0.36, 0, 0.64, 1) -5.714s infinite alternate;
        }

        #loop2 .ball4 {
            animation: animX2 10s cubic-bezier(0.36, 0, 0.64, 1) -13.571s infinite alternate,
                animY2 10s cubic-bezier(0.36, 0, 0.64, 1) -8.571s infinite alternate,
                scale 20s cubic-bezier(0.36, 0, 0.64, 1) -8.571s infinite alternate;
        }

        #loop2 .ball5 {
            animation: animX2 10s cubic-bezier(0.36, 0, 0.64, 1) -16.428s infinite alternate,
                animY2 10s cubic-bezier(0.36, 0, 0.64, 1) -11.428s infinite alternate,
                scale 20s cubic-bezier(0.36, 0, 0.64, 1) -11.428s infinite alternate;
        }

        #loop2 .ball6 {
            animation: animX2 10s cubic-bezier(0.36, 0, 0.64, 1) -19.285s infinite alternate,
                animY2 10s cubic-bezier(0.36, 0, 0.64, 1) -14.285s infinite alternate,
                scale 20s cubic-bezier(0.36, 0, 0.64, 1) -14.285s infinite alternate;
        }

        #loop2 .ball7 {
            animation: animX2 10s cubic-bezier(0.36, 0, 0.64, 1) -22.142s infinite alternate,
                animY2 10s cubic-bezier(0.36, 0, 0.64, 1) -17.142s infinite alternate,
                scale 20s cubic-bezier(0.36, 0, 0.64, 1) -17.142s infinite alternate;
        }
    </style>
</head>

<body>

    <div id="loop">
        <div class="ball ball1">1</div>
        <div class="ball ball2">2</div>
        <div class="ball ball3">3</div>
        <div class="ball ball4">4</div>
        <div class="ball ball5">5</div>
        <div class="ball ball6">6</div>
        <div class="ball ball7">7</div>
    </div>
    <div id="loop2">
        <div class="ball ball1">1</div>
        <div class="ball ball2">2</div>
        <div class="ball ball3">3</div>
        <div class="ball ball4">4</div>
        <div class="ball ball5">5</div>
        <div class="ball ball6">6</div>
        <div class="ball ball7">7</div>
    </div>
</body>

</html>